package com.neusoft.neuiotms.dcam.fixed.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 机器配件和机器设备的绑定关系表
 *
 * @author lxj
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = "neuiot_machine_parts_bind_relation")
@org.hibernate.annotations.Table(appliesTo = "neuiot_machine_parts_bind_relation", comment = "机器配件和机器设备的绑定关系表")
public class MachinePartsBind extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;
        
    /** 绑定资产编号 */
    @NotBlank(message = "绑定资产编号不能为空")
    @Length(max = 255, message = "绑定资产编号不能超过{max}位")
    @Column(length = 255, nullable = false, unique = false)
    private String bindCode;
    
    /** 绑定资产名称 */
    @NotBlank(message = "绑定资产名不能为空")
    @Length(max = 255, message = "绑定资产名不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String bindName;
    
    /** 配件资产编号 机器设备-其他计算机设备-机器配件 */
    @NotBlank(message = "配件资产编号不能为空")
    @Length(max = 255, message = "配件资产编号不能超过{max}位")
    @Column(length = 255, nullable = false, unique = false)
    private String partsCode;
    
    /** 配件资产名称 机器设备-其他计算机设备-机器配件 */
    @NotBlank(message = "配件资产名不能为空")
    @Length(max = 255, message = "配件资产名不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String partsName;
    
    /** 绑定状态： 1绑定  0解绑*/
    @Length(max = 255, message = "绑定状态不能超过{max}位")
    @Column(length = 255, nullable = false)
    private String status;

}
